Fix grant-table initialisation so that domain destruction does not barf.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 16 Feb 2007 12:13:33 +0000 (12:13 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 16 Feb 2007 12:13:33 +0000 (12:13 +0000)
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/common/grant_table.c

index f6961d5b1ab9fb6b32affd6fff4e8a0592b13be7..764af854ebd2f735833586626e96f2fb96853706 100644 (file)
@@ -1329,6 +1329,7 @@ grant_table_create(
     memset(t->maptrack, 0, max_nr_maptrack_frames() * sizeof(t->maptrack[0]));
     if ( (t->maptrack[0] = alloc_xenheap_page()) == NULL )
         goto no_mem_3;
+    memset(t->maptrack[0], 0, PAGE_SIZE);
     t->maptrack_limit = PAGE_SIZE / sizeof(struct grant_mapping);
     for ( i = 0; i < t->maptrack_limit; i++ )
         t->maptrack[0][i].ref = i+1;